package com.punai.common.constant;

import cn.hutool.core.util.StrUtil;

public class SysConstants {

    public static final String CREATE_TYPE = "C";
    public static final String DEFAULT_CREATE_TYPE = "O";

    public enum TGroupEnum {
        YES("Y", "确认"),
        NO("N", "取消"),
        ;

        private String type;
        private String desc;

        TGroupEnum(String type, String desc) {
            this.type = type;
            this.desc = desc;
        }


        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public static boolean validate(String input) {
            for (TGroupEnum value : values()) {
                if (!StrUtil.equals(value.getType(),input)) {
                    return false;
                }
            }
            return true;
        }

    }


}
